package com.hzl.lease.web.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzl.lease.model.entity.UserInfo;
import com.hzl.lease.web.app.service.UserInfoService;
import com.hzl.lease.web.app.mapper.UserInfoMapper;
import com.hzl.lease.web.app.vo.user.UserInfoVo;
import org.springframework.stereotype.Service;

/**
* @author liubo
* @description 针对表【user_info(用户信息表)】的数据库操作Service实现
* @createDate 2023-07-26 11:12:39
*/
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
    implements UserInfoService{
    @Override
    public UserInfoVo info(Long userId) {
        UserInfo userInfo = this.getById(userId);
        //获取头像和昵称，返回前端
        return new UserInfoVo(userInfo.getNickname(),userInfo.getAvatarUrl());
    }
}




